for
Pascal C/C++
w for i := 1 to n do
w x[i] := 0
for (i = 1; i <= n; i++)
x[i] = 0;
NO PASCAL EQUIVALENT USING FOR
for (i = 1; i <= n; i += 10)
x[i] = 0;
NO PASCAL EQUIVALENT USING FOR
for (i = 1; i <= n && x[i] !=0; i++);
zeroes x[1], x[11], x[21],…
Example 3: Finds first element of x[] that is 0; stops if all n elements are examined without finding one.